{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%pylab inline --no-import-all\n",
      "import sys\n",
      "sys.path.extend([u'/home/hadoop/vlmm2/'])"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Populating the interactive namespace from numpy and matplotlib\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import vlmm2.vlmm"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "!stop-all.sh\n",
      "!start-all.sh\n",
      "#!hadoop namenode -format"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Warning: $HADOOP_HOME is deprecated.\r\n",
        "\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "stopping jobtracker\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node4: stopping tasktracker\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node2: stopping tasktracker\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node3: stopping tasktracker\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "stopping namenode\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node4: stopping datanode\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node3: stopping datanode\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node2: stopping datanode\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node1: stopping secondarynamenode\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Warning: $HADOOP_HOME is deprecated.\r\n",
        "\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-namenode-node1.out\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node4: starting datanode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-datanode-node4.out\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node3: starting datanode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-datanode-node3.out\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node2: starting datanode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-datanode-node2.out\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node1: starting secondarynamenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-secondarynamenode-node1.out\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "starting jobtracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-jobtracker-node1.out\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node4: starting tasktracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-node4.out\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node3: starting tasktracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-node3.out\r\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "node2: starting tasktracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-node2.out\r\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "vlmm2.vlmm.calc_time(True)\n",
      "vlmm2.vlmm.calc_time(False)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: Warning: $HADOOP_HOME is deprecated.\n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: \n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "files size: 100000000\n",
        "mrjob mode: True\n",
        "model length: 1\n",
        "kernel_smooth: False\n",
        "time: 663.152085066"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "files size: 100000000\n",
        "mrjob mode: False\n",
        "model length: 1\n",
        "kernel_smooth: False\n",
        "file /home/hadoop/vlmm2/vlmm2/../data_for_time/train1/pfam.txt\n",
        "time: 126.268488169"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n"
       ]
      },
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 8,
       "text": [
        "126.26848816871643"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "vlmm2.vlmm.calc_time(True)\n",
      "vlmm2.vlmm.calc_time(False)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: Warning: $HADOOP_HOME is deprecated.\n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: \n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "files size: 245.475883484M\n",
        "mrjob mode: True\n",
        "model length: 2\n",
        "kernel_smooth: False\n",
        "time: 2328.853477"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "files size: 245.475883484M\n",
        "mrjob mode: False\n",
        "model length: 2\n",
        "kernel_smooth: False\n",
        "file /home/hadoop/vlmm2/vlmm2/../data_for_time/train1/pfam.txt\n",
        "time: 584.499224901"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n"
       ]
      },
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 3,
       "text": [
        "584.4992249011993"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "vlmm2.vlmm.calc_time(True)\n",
      "vlmm2.vlmm.calc_time(False)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: Warning: $HADOOP_HOME is deprecated.\n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: \n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "files size: 245.475883484M\n",
        "mrjob mode: True\n",
        "model length: 2\n",
        "kernel_smooth: False\n",
        "time: 218.901707888"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "files size: 245.475883484M\n",
        "mrjob mode: False\n",
        "model length: 2\n",
        "kernel_smooth: False\n",
        "file /home/hadoop/vlmm2/vlmm2/../data_for_time/train1/pfam.txt\n",
        "time: 620.477015018"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n"
       ]
      },
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 4,
       "text": [
        "620.4770150184631"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "vlmm2.vlmm.calc_time(True)\n",
      "vlmm2.vlmm.calc_time(False)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: Warning: $HADOOP_HOME is deprecated.\n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: \n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "files size: 245.475883484M\n",
        "mrjob mode: True\n",
        "model length: 1\n",
        "kernel_smooth: False\n",
        "time: 131.448464155"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "files size: 245.475883484M\n",
        "mrjob mode: False\n",
        "model length: 1\n",
        "kernel_smooth: False\n",
        "file /home/hadoop/vlmm2/vlmm2/../data_for_time/train1/pfam.txt\n",
        "time: 475.453184843"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n"
       ]
      },
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 3,
       "text": [
        "475.45318484306335"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "vlmm2.vlmm.calc_time(True)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: Warning: $HADOOP_HOME is deprecated.\n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ERROR:mrjob.fs.hadoop:STDERR: \n",
        "\n"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "files size: 245.475883484M\n",
        "mrjob mode: True\n",
        "model length: 1\n",
        "kernel_smooth: False\n",
        "time: 134.558692932"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n"
       ]
      },
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 5,
       "text": [
        "134.5586929321289"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}